import Main from '../views/main/index';
import Classify from '../views/main/classify';
import Recommend from '../views/main/recommend';
import Food from '../views/main/food';
import My from '../views/main/my';
import Detail from '../views/detail/index';
import List from '../views/list/index';
import Comment from '../views/comment/index';
import {RouteItemProp} from './type.d';

const routes:RouteItemProp[] = [
    {
        path:'/main',
        component:Main,
        children:[
            {
                path:'/main/recommend',
                component:Recommend
            },
            {
                path:'/main/food',
                component:Food
            },
            {
                path:'/main/classify',
                component:Classify
            },
            {
                path:'/main/my',
                component:My
            },
            {
                path:'/main',
                redirect:'/main/classify'
            }
        ]
    },
    {
        path:'/detail/:id',
        component:Detail
    },
    {
        path:'/list/:id',
        component:List
    },
    {
        path:'/comment',
        component:Comment
    },
    {
        path:'/',
        redirect:'/main'
    }
];


export default routes;
